1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"949.35">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #bf0000}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #000000; min-height: 12.0px}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #000000}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
16 span
.s1
{font: 18.0px Helvetica
}
17 span
.s2
{color: #0033f1}
18 span
.s3
{font: 12.0px Helvetica
; color: #000000}
19 span
.s4
{color: #000000}
20 span
.s5
{color: #0000bf}
21 span
.Apple-tab-span
{white-space:pre
}
25 <p class=
"p1"><span class=
"s1"><b>Dwhite, Diwhite
</b></span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>demand rate white noise random generators
</b></p>
26 <p class=
"p2"><br></p>
27 <p class=
"p1">superclass: DUGen
</p>
28 <p class=
"p2"><br></p>
29 <p class=
"p2"><br></p>
30 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>*new(lo, hi, length)
</b></p>
31 <p class=
"p2"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
32 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>lo
</b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>minimum value
</p>
33 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>hi
</b> <span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>maximum value
</p>
34 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>length
</b><span class=
"Apple-tab-span"> </span>number of values to create
</p>
35 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
36 <p class=
"p1"><span class=
"Apple-tab-span"> </span>Dwhite returns numbers in the continuous range between lo and hi, Diwhite returns integer values
</p>
37 <p class=
"p1"><span class=
"Apple-tab-span"> </span>The arguments can be a number or any other ugen
</p>
38 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
39 <p class=
"p1"><span class=
"Apple-tab-span"> </span>structurally related:
<a href=
"../../../Streams-Patterns-Events/Patterns/Pwhite.html"><span class=
"s2"><b><i>Pwhite
</i></b></span></a><b><i>,
</i></b><a href=
"../../Noise/WhiteNoise.html"><span class=
"s2"><b><i>WhiteNoise
</i></b></span></a></p>
40 <p class=
"p1"><b><i><span class=
"Apple-tab-span"> </span></i></b>see also:
<a href=
"Demand.html"><span class=
"s2"><b>Demand
</b></span></a><span class=
"Apple-tab-span"> </span></p>
41 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
42 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
43 <p class=
"p3"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span>// example
</p>
44 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
45 <p class=
"p3"><span class=
"s4"><span class=
"Apple-tab-span"> </span></span>// Dwhite
</p>
46 <p class=
"p5"><span class=
"Apple-tab-span"> </span>(
</p>
47 <p class=
"p5"><span class=
"Apple-tab-span"> </span>{
<span class=
"Apple-converted-space"> </span></p>
48 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">var
</span> a, freq, trig;
</p>
49 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>a =
<span class=
"s5">Dwhite
</span>(
0,
15,
<span class=
"s5">inf
</span>);
</p>
50 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>trig =
<span class=
"s5">Impulse
</span>.kr(
<span class=
"s5">MouseX
</span>.kr(
1,
40,
1));
</p>
51 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>freq =
<span class=
"s5">Demand
</span>.kr(trig,
0, a) *
30 +
340;
<span class=
"Apple-converted-space"> </span></p>
52 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">SinOsc
</span>.ar(freq) *
0.1</p>
53 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
54 <p class=
"p5"><span class=
"Apple-tab-span"> </span>}.play;
</p>
55 <p class=
"p5"><span class=
"Apple-tab-span"> </span>)
<span class=
"Apple-tab-span"> </span></p>
56 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
57 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
58 <p class=
"p3"><span class=
"s4"><span class=
"Apple-tab-span"> </span></span>// Diwhite
</p>
59 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
60 <p class=
"p5"><span class=
"Apple-tab-span"> </span>(
</p>
61 <p class=
"p5"><span class=
"Apple-tab-span"> </span>{
<span class=
"Apple-converted-space"> </span></p>
62 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">var
</span> a, freq, trig;
</p>
63 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>a =
<span class=
"s5">Diwhite
</span>(
0,
15,
<span class=
"s5">inf
</span>);
</p>
64 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>trig =
<span class=
"s5">Impulse
</span>.kr(
<span class=
"s5">MouseX
</span>.kr(
1,
40,
1));
</p>
65 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>freq =
<span class=
"s5">Demand
</span>.kr(trig,
0, a) *
30 +
340;
<span class=
"Apple-converted-space"> </span></p>
66 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">SinOsc
</span>.ar(freq) *
0.1</p>
67 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
68 <p class=
"p5"><span class=
"Apple-tab-span"> </span>}.play;
</p>
69 <p class=
"p5"><span class=
"Apple-tab-span"> </span>)
</p>
70 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
71 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
72 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
73 <p class=
"p3"><span class=
"s4"><span class=
"Apple-tab-span"> </span></span>// Dwhite and Diwhite
</p>
74 <p class=
"p5"><span class=
"Apple-tab-span"> </span>(
</p>
75 <p class=
"p5"><span class=
"Apple-tab-span"> </span>{
<span class=
"Apple-converted-space"> </span></p>
76 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">var
</span> a, freq, trig;
</p>
77 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>a =
<span class=
"s5">Dwhite
</span>(
0,
<span class=
"s5">Dseq
</span>([
<span class=
"s5">Dgeom
</span>(
1,
1.01,
<span class=
"s5">Diwhite
</span>(
50,
800,
<span class=
"s5">inf
</span>))],
<span class=
"s5">inf
</span>) -
1,
<span class=
"s5">inf
</span>);
</p>
78 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>freq =
<span class=
"s5">Duty
</span>.kr(
<span class=
"s5">SampleDur
</span>.ir,
0, a) +
340;
<span class=
"Apple-converted-space"> </span></p>
79 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">SinOsc
</span>.ar(freq) *
0.1</p>
80 <p class=
"p4"><span class=
"Apple-tab-span"> </span></p>
81 <p class=
"p5"><span class=
"Apple-tab-span"> </span>}.play;
</p>
82 <p class=
"p5"><span class=
"Apple-tab-span"> </span>)
</p>
83 <p class=
"p6"><br></p>
84 <p class=
"p6"><span class=
"Apple-tab-span"> </span></p>
85 <p class=
"p6"><span class=
"Apple-tab-span"> </span></p>